package encaps.entities;

import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
import javax.ejb.FinderException;

public interface MovieLocalHome extends EJBLocalHome {

    MovieLocal create(String name, String picture, String descript, HashSet genres, HashSet persons, Date russianReleaseDate,
            Date worldReleaseDate, String producingCountries, String studio, Integer russianCash, Integer worldCash,
            Integer length) throws CreateException;

    MovieLocal findByPrimaryKey(java.lang.Long key) throws FinderException;

    Collection<MovieLocal> findPaged(String title, String sortColumn,
            OrderType orderType, Integer from, Integer count);

    Collection<MovieLocal> findByParametersPaged(String title,
            String producingCountries, String genre, String personName,
            String studio, Double ratingMin, Double ratingMax, String description,
            Integer budgetMin, Integer budgetMax, Integer worldCashMin,
            Integer worldCashMax, String sortColumn, OrderType orderType,
            int from, int count) throws FinderException;

    Collection<MovieLocal> findAll();

    Integer getMoviesCount(String title) throws FinderException;

    Integer getMoviesCount(String title, String producingCountries,
            String genre, String personName, String studio, Double ratingMin,
            Double raitngMax, String description, Integer budgetMin, Integer budgetMax,
            Integer worldCashMin, Integer worldCashMax);
    //Integer getFoundMoviesCount(String title);
    //Collection<String> searchByTitlePaged(String title, int from, int count);
}
